import request from '@/utils/request';
// 获取广告列表
export async function pageVideoType(data) {
  const res = await request.post('/VideoTypeList', data);
  // console.log(666666666, res);
  if (res.status === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.msg));
}
// 删除
export async function removeVideoType(ids) {
  const res = await request.post('/DeleteVideoType', ids);

  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
}
// 添加
export async function addVideoType(data) {
  const res = await request.post('/CreateVideoType', data);
  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
}
// 修改
export const updateVideoType = async (data) => {
  const res = await request.post('/UpdateVideoType', data);
  if (res.status === 0) {
    return res.msg;
  }
  return Promise.reject(new Error(res.msg));
};
